You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
louisdh opened this issue
Apr 21, 2017
· 1 comment
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselffeatureA feature request or implementation
Consider the following example with 2 modules and 3 files.
Module A: File1.swift & File2.swift
File1.swift:
importFoundationfuncfoo() {
lett1 = SomeModuleType() // error, as expectedlett2 = getSomeModuleType() // compiles, expected error: "Need to import module B to use this function's return type"print(t2.printMe()) // prints "Hello from unimported module!"
}
I'm not sure if this is by design, but it certainly feels like a bug to me that a type from an unimported module becomes "available" (e.g. allows to call any methods on it).
The text was updated successfully, but these errors were encountered:
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselffeatureA feature request or implementation
Environment
Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: 8276573cf5b3264bca7dd66688bdd221
Issue Description:
Consider the following example with 2 modules and 3 files.
Module A: File1.swift & File2.swift
File1.swift:
File2.swift:
Module B: SomeModuleType.swift
I'm not sure if this is by design, but it certainly feels like a bug to me that a type from an unimported module becomes "available" (e.g. allows to call any methods on it).
The text was updated successfully, but these errors were encountered: