mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Otherwise integrated REPL and other tools like LLDB would produce incorrect results or crash. Resolves: rdar://problem/30933988
14 lines
556 B
Swift
14 lines
556 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -emit-module -o %t/rdar30933988_enum.swiftmodule %S/Inputs/rdar30933988_enum.swift
|
|
// RUN: %target-typecheck-verify-swift -I %t -disable-access-control
|
|
|
|
import rdar30933988_enum
|
|
|
|
let _: E = .foo
|
|
// expected-error@-1 {{generic parameter 'T' could not be inferred}}
|
|
let _: E<Int> = .foo // Ok
|
|
let _: E = .bar(42) // Ok
|
|
let _: E<String> = .bar(42)
|
|
// expected-error@-1 {{member 'bar' in 'E<String>' produces result of type 'E<T>', but context expects 'E<String>'}}
|
|
let _: E<Int> = .bar(42) // Ok
|